package com.woniu108;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;

@SpringBootApplication(scanBasePackages = {"com.woniu108"})
@MapperScan(basePackages = "com.woniu108.extra.mapper")
@EnableFeignClients(basePackages = "com.woniu108.extra.client")
public class ExtraStart {


    @Autowired
    private ApplicationContext applicationContext;

    @Bean
    public AutowireCapableBeanFactory autowireCapableBeanFactory() {
        return applicationContext.getAutowireCapableBeanFactory();
    }


    public static void main(String[] args) {
        SpringApplication.run(ExtraStart.class,args);
    }
}
